package com.xingge.sdktest;/*
package com.xingge.sdktest;

import android.content.Context;
import android.os.Environment;
import android.util.Log;

import com.jolimark.convert.PDFCallBack;
import com.jolimark.convert.PrintConverter;


*/
/**
 * @author 星哥的
 *//*

public class SendThread extends Thread {

    private PrintConverter printConverter;
    private Context context;

    public SendThread(Context context) {
        printConverter = new PrintConverter(context);
        this.context = context;
    }


    @Override
    public void run() {
        processCommand();
    }

    private void processCommand() {
        PrintConverter.PrintParams printParams = new PrintConverter.PrintParams();
        printParams.colorType = PrintConverter.ColorType.DOUBLE;
        printParams.sideType = PrintConverter.SideType.SINGLE;
        printParams.qualityType = PrintConverter.QualityType.HIGH;
        byte[] printBytes = PrintConverter.convertImg(context, Environment.getExternalStorageDirectory().getAbsolutePath() + "/1.png", printParams);

        printConverter.convertPDF(Environment.getExternalStorageDirectory().getAbsolutePath() + "/print.pdf", printParams, null, new PDFCallBack() {
            @Override
            public int onPageConverted(byte[] bytes, int[] ints) {
                return bytes.length;
            }

            @Override
            public void onSuccess() {
                Log.e("xing", "pdf 转 byte 成功");
            }

            @Override
            public void onFail() {
                Log.e("xing", "pdf 转 byte fail");
            }

            @Override
            public void onCancel() {
                Log.e("xing", "pdf 转 byte 取消");
            }
        });
    }

}
*/
